package com.cnctema.easecalendar_weekly_view.database

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * @ClassName: Event
 * @Description: 日历事件model类(类的作用描述)
 * @Author: cnctema
 * @CreateDate: 2020/5/26 3:14
 */
@Entity(tableName = "usual_event_table")
data class Event(
    @PrimaryKey(autoGenerate = true)
    var eventId: Long = 0L, //数据库自动id

    @ColumnInfo(name = "event_uid")
    var eventUID:String = System.currentTimeMillis().toString() + "0000",   //自定义事件uid

    // 事件内容
    @ColumnInfo(name = "event_title")
    var eventTitle:String = "",                 //标题
    @ColumnInfo(name = "event_description")
    var eventDes:String = "",                   //事件描述
    @ColumnInfo(name = "event_location")
    var eventLocation:String = "",              //地点

    // 时间
    @ColumnInfo(name = "start_time_milli")
    var startTimeMilli: Long = System.currentTimeMillis(),      //开始时间
    @ColumnInfo(name = "end_time_milli")
    var endTimeMilli: Long = startTimeMilli,                    //结束时间
    @ColumnInfo(name = "finish_time_milli")
    var finishTimeMilli: Long = -1L,                            //标记完成事件时间

    //事件标记
    @ColumnInfo(name = "event_type")
    var eventType:Int = 0,                          //事件类型
    @ColumnInfo(name = "event_reminder_minutes")
    var eventReMin:Int = 1,                         //提前提醒设置
    @ColumnInfo(name = "event_repeat_interval")
    var eventRepeat:Int = 0,                        //重复提醒设置
    @ColumnInfo(name = "event_is_personal")
    var eventIsPersonal : Boolean = false,          //是否为私密事件

    // 邀请内容
    @ColumnInfo(name = "event_invitee")
    var eventInvitee:String = "",           //被邀请人
    @ColumnInfo(name = "event_invitor")
    var eventInvitor:String,                //邀请人 非空

    //自定事件优先级
    @ColumnInfo(name = "event_prior")
    var priority:Int = 0,                   //事件优先级

    //更新时间
    @ColumnInfo(name = "event_lastsync")
    var lastSync:Long = -1L                 //事件信息更新时间
)